gint minimum_above, natural_above;
gint minimum_below, natural_below;
gboolean have_baseline;
- gint baseline;
+ int baseline = -1;
GtkPackType packing;
sizes[i].natural_size = child_size;
if (private->orientation == GTK_ORIENTATION_HORIZONTAL &&
- gtk_widget_get_valign (child->widget) == GTK_ALIGN_BASELINE)
+ gtk_widget_get_valign (child->widget) == GTK_ALIGN_BASELINE)
{
int child_allocation_width;
int child_minimum_height, child_natural_height;
}
}
- baseline = gtk_widget_get_allocated_baseline (widget);
+ if (private->orientation == GTK_ORIENTATION_HORIZONTAL)
+ baseline = gtk_widget_get_allocated_baseline (widget);
+
+ /* we only calculate our own baseline if we don't get one passed from the parent
+ * and any of the child widgets explicitly request one */
if (baseline == -1 && have_baseline)
{
gint height = MAX (1, allocation->height);